package com.zjw.spring.model;

public class Car {

	private String brand;
	
	private String name;
	
	private double price;

	public Car() {
		super();
		System.out.println("Car() constructor executed.. ");
	}

	public Car(String brand, String name, double price) {
		super();
		this.brand = brand;
		this.name = name;
		this.price = price;
		System.out.println("Car(String " +brand+",String "+name+",double "+price+") executed.. ");
	}

	public Car(String name, double price) {
		super();
		this.name = name;
		this.price = price;
		System.out.println("Car(String "+name+",double "+price+") executed.. ");
	}

	public Car(double price ,String brand) {
		super();
		this.price = price;
		this.brand = brand;
		System.out.println("Car(double "+price+",String "+brand+") executed.. ");
	}

	public void setBrand(String brand) {
		this.brand = brand;
		System.out.println(this.getClass().getName() +".setBrand(" + brand + ") executed..");
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	@Override
	public String toString() {
		return "Car [brand=" + brand + ", name=" + name + ", price=" + price
				+ "]";
	}
	
}
